/*
 * @Description: 登录 接口定义
 * @Version: 1.0
 * @Author: yxx
 * @Date: 2023-09-21 11:42:43
 * @LastEditors: yxx
 * @LastEditTime: 2025-05-16 17:26:10
 */

export namespace LoginSpace {
  // 用户登录
  export interface Login {
    account: string
    password: string
    code: string
    uuid: string
  }
  // 用户登录信息
  export interface User {
    account?: string
    email: string
    id?: number
    imgPath: string
    loginDate?: string
    name: string
    phone: string
    pwdModifyTime?: string
    sex?: number
    status: number
    deptList: { id: number; name: string }[]
    roleList: { id: number; name: string }[]
  }
  export interface UserInfo {
    token: string
    loginTime: number
    expireTime: number
    user: User
    perms: string[]
    menus: UserMenu[]
    deptList: { id: number; name: string }[]
    roleList: { id: number; name: string }[]
  }
  // 用户权限
  export interface UserMenu {
    children: UserMenu[]
    component: string
    icon: string
    id?: number
    isAffix: boolean
    isLink?: string
    isFull: boolean
    isHide: boolean
    isKeepAlive: boolean
    name: string
    path: string
    perms: string
    pid: number
    sort: number
    type: number
    updateBy: string
    updateTime: string
  }
  export interface UserPermissions {
    perms: string[]
    menus: UserMenu[]
  }
  // 修改密码
  export interface ModifyPassword {
    account: string
    oldPassword: string
    newPassword: string
  }
  // 验证码
  export interface CodeInfo {
    codeEnable: boolean
    uuid: string
    codeImg: string
  }
}
